import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path:'/login',component:()=>import('@/views/login/LoginPage.vue')},
    {path:'/',
     component:()=>import('@/views/layout/LayoutContainer.vue'),
     redirect:'/login',
     children:[
      {path:'/article/channel',component:()=>import('@/views/article/ArticleChannel.vue')},
      {path:'/article/manage',component:()=>import('@/views/article/ArticleManage.vue')},
      {path: '/article/detail/:id', component: () => import('@/views/article/ArticleDetail.vue'),},
      {path:'/article/sign',component:()=>import('@/views/article/ArticleSign.vue')},
      {path:'/article/typewriting',component:()=>import('@/views/article/TypeWriting.vue')},
      {path:'/article/forum',component:()=>import('@/views/article/ArticleForum.vue')},
      {path:'/discussion/:id',component:()=>import('@/views/article/DiscussionDetail.vue')},
      {path:'/article/income',component:()=>import('@/views/article/ArticleIncome.vue')},
      {path:'/article/match',component:()=>import('@/views/article/ArticleMatch.vue')},
      {path:'/user/avatar',component:()=>import('@/views/user/UserAvatar.vue')},
      {path:'/user/password',component:()=>import('@/views/user/UserPassword.vue')},
      {path:'/user/profile',component:()=>import('@/views/user/UserProfile.vue')}, 
      {path:'/article/service',component:()=>import('@/views/article/ArticleService.vue')},
      {path:'/article/notice',component:()=>import('@/views/article/ArticleNotice.vue')},
      {path:'/article/message',component:()=>import('@/views/article/ArticleMessage.vue')},
      {path:'/article/session/:id',component:()=>import('@/views/article/ArticleSession.vue')}
     ],} ] 
})



export default router
